<template>
  <div class="hotelDVBox">
      <div class="imgBox Sons">
          <img src="@/assets/img/hotelBackground.png" alt="">
          <div class="textBox"></div>
      </div>
      <div class="searchArea">
          <h3 class="tLeft"></h3>
          <section> 
              <div class="booking-info">
                  <div class="info-item">
                      <el-input size="large"></el-input>
                  </div>
                  <div class="info-item">
                      <el-input-number size="large"></el-input-number>
                  </div>
                  <div class="info-item">
                      <el-rate size="large"></el-rate>
                  </div> 
                  <div class="info-item">
                      <el-button size="large" type="warning" style="font-weight:700">Search</el-button>
                  </div> 
              </div> 
              <div class="flex notifyBox jsb aCenter">
                  <div class="nSon flex aCenter" v-for="(item ,index) in descList" :key="index">
                      <div class="nC" :class="item.bgC"> 
                      </div>
                      <div class="btContent">
                          <div>
                              {{ item.name }}
                          </div>
                          <div>
                              {{ item.desc }}
                          </div>
                      </div>
                  </div> 
              </div>
          </section> 
      </div>

      <div class="hotel-booking-page"> 
          <section class="booking-info-section">
              <div class="booking-details">
              <div class="mt40">
                  <div class="ztTitle tCenter mb40" style="color:#08ade6; font-size:30px;font-weight:700">Themed accommodation</div>
                  <div class="flex flexWrap aCenter jsb lyDBox tCenter ">
                      <div v-for="(item,index) in jdListBox" :key="index" :style="{background:`url(${item.img}) no-repeat`}"  @click="$router.push(`/hotel/search/${item.city}`)" class="pRelative">
                          <div class="infod pAbsolute">
                              <div class="title">{{ item.city }}</div>
                              <div class="desc">{{ item.label }}</div>
                          </div>
                      </div>
                  </div>
              </div>
              </div>
          </section>
      </div>
  </div>
</template>

<script setup>
const descList=[
    {bgC:'n1',name:'Accommodation guide',desc:'Everything from regional walkthroughs to featured themes'},
    {bgC:'n2',name:'Exclusive price',desc:'Multi-platform price comparison, enjoy special offers every day'},
    {bgC:'n1',name:'True review',desc:'Over 1 million real user reviews and travel notes'},
]

const jdListBox= [
    {
        img:new URL(`@/assets/img/hotel/shanghai.jpeg`, import.meta.url).href,
        city: 'Chengdu',
        label: 'Sihuan', 
    },
    {
        img:new URL(`@/assets/img/hotel/beijing.jpeg`, import.meta.url).href,
        city: 'Kunming',
        label: 'Yunnan',
    },
    {
        img:new URL(`@/assets/img/hotel/xianggang.jpeg`, import.meta.url).href,
        city: 'Zunyi',
        label: 'Guiyang',
    },
    {
        img:new URL(`@/assets/img/hotel/xian.jpeg`, import.meta.url).href,
        city: 'Chongqing',
        label: 'Chongqing',
    },
    {
        img:new URL(`@/assets/img/hotel/sanya.jpeg`, import.meta.url).href,
        city: 'Jinan',
        label: 'Shandong',
    },
    {
        img:new URL(`@/assets/img/hotel/zibo.jpg`, import.meta.url).href,
        city: 'Taiyuan',
        label: 'Shanxi',
    }
] 
</script>
  
  <style lang="less" scoped>
    .hotelDVBox{
        position: relative;
        .imgBox{
            img{
                height: 300px;
            }
            &.Sons{
                position: relative;
                .textBox{
                    position: absolute;
                    width:1200px;
                    margin: 0 auto;
                    top:20px;   
                    transform:translateX(50%);
                    left:10%;
                }
            }
        }
    }
    .searchArea{
        box-shadow: 0 0 5px gray;
        border-radius: 10px;
        position: absolute;
        left: 50%;
        transform: translateX(-50%);
        top: 120px;
        background: linear-gradient(180deg, #e8f8ff, white);
        width: 1200px;
        padding: 20px;
    }
    .ztTitle{
        font-size: 24px;
        color: #333;
        line-height: 30px;
    }
    .hotel-booking-page {
        padding: 20px;
        width:1000px;
        margin:0 auto;
      
    }
    .lyDBox{
        >div{
            width:300px;
            height:240px; 
            margin-bottom: 20px;
            cursor: pointer;
            .infod{ 
                position: absolute;
                z-index: 3;
                left: 0;
                top: 50%;
                width: 100%;
                margin-top: -30px;
            }
            .title{
                font-size: 30px;
                color: #FFF;
                font-weight: normal;
            }
            .desc{
                font-size: 18px;
                color: #FFF;
            }
        }
    }
    .notifyBox{
        margin-top: 30px;
        .btContent{
            width:200px;
            color:#666;
            >div:nth-child(1){
                font-size: 18px;
            }
            >div:nth-child(2){
                font-size: 14px;
            }
        }
        .n1{
            width: 35px;
            height: 42px;
            background-position: 0 0;
        }
        .n2{
            width: 43px;
            height: 42px;
            background-position: -40px 0!important; 
        }
        .n3{
            width: 44px;
            height: 42px;
            background-position: -85px 0!important; 
        }
        .nC{
            display: block;
            float: left;
            margin-right: 13px;
            background: url(./../assets/img/hotel-sprites1.png) no-repeat;
            }
        } 
    .my-header h4{
        font-weight: bold;
    }
    .my-header {
        display: flex;
        flex-direction: row;
        justify-content: space-between;
        gap: 16px;
    }   
  .formDataBox{
    width: 80%;
    margin: 0 auto;
  }
  .roomType li{
    cursor: pointer;
  }
  .roomType li.ed{
    color: #004096;
    font-weight: bold;
  }
  .dateLabel{
    width: 130px;
    display: inline-block;
  }
  .reserveTap{
    position: absolute;
    bottom: 40px;
    right: 20px; 
  }
  .city-selection {
    text-align: center;
    margin-bottom: 20px;
  }
  
  .city-buttons {
    margin-top: 10px;
  }
  
  .btn-city {
    padding: 10px 20px;
    margin: 0 10px;
    background-color: #007bff;
    color: #fff;
    border: none;
    border-radius: 5px;
    cursor: pointer;
  }
  
  .btn-city:hover {
    background-color: #0056b3;
  } 
  .booking-details {
    margin-bottom: 20px; 
  }
  
  .price-details {
    background-color: #fff;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    position:relative;
  }
  
  .nav-link {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: #333;
  }
  
  .nav-link i {
    margin-right: 5px;
  }
 
  .booking-info{
    display: flex;
    align-items: center;
    .info-item{
        margin-right: 20px;
    }
  }
  .btn-room-type {
    padding: 10px 20px;
    background-color: #007bff;
    color: #fff;
    border: none;
    border-radius: 5px;
    cursor: pointer;
  }
  
  .btn-room-type:hover {
    background-color: #0056b3;
  }
  
  .price-row {
    display: flex;
  
    .price-row {
      display: flex;
      justify-content: space-between;
      margin-bottom: 10px;
    }
  
    .price-info p {
      margin: 0;
    }
  
    .price-info:first-child {
      margin-right: 20px;
    }
  
    ul {
      padding: 0;
      margin: 0;
      list-style: none;
    }
  
    ul li {
      cursor: pointer;
    }
  
    ul li:hover {
      text-decoration: underline;
    }
  
    .date-picker {
      margin-top: 10px;
    }
  
    .date-picker label {
      margin-right: 10px;
    }
  
    .guest-selector {
      margin-top: 10px;
    }
  
    .guest-selector label {
      margin-right: 10px;
    }
  }
  </style>
